function [std] = standard_deviation(image, mean, window, padding)

% Standard deviation
meanSquare = averagefilter(image.^2, window, padding);
std = (meanSquare - mean.^2).^0.5;
% A2 = averagefilter(A.^2);
% ab2 = averagefilter(-2*A).*mean;
% std = (mean.^2 + ab2 +A2).^0.5; 
end

